# Add Git to PATH\$env:Path += ";C:\Program Files\Git\bin"

# Verify Git installation
try {
    \$gitVersion = git --version
    Write-Host "Git version: \$gitVersion"
} catch {
    Write-Host "Git is not installed correctly or not in PATH"
    pause
    exit 1
}

# Configure Git user information
git config --global user.name "yuzh0618"
git config --global user.email "yuzh0618@126.com"

# Initialize Git repository
git init

# Add remote repository
git remote add origin https://gitee.com/yuzh0618/mess-mcp.git

# Add all files
git add .

# Commit changes
git commit -m "Initial commit"

# Push to remote repository
try {
    git push -u origin master
    Write-Host "Code pushed successfully!"
} catch {
    Write-Host "Failed to push code. Check network connection and Gitee credentials."
}

pause